package com.hxzy.research.controller;

import com.hxzy.research.service.pageandmanager.PageBranch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class PageController {
    @Autowired
    private PageBranch pageBranch;
    //查询全部的分公司
    @RequestMapping("/index.go")
    public ModelAndView findAllBranch() throws Exception{
        ModelAndView mv=new ModelAndView();
        mv.addObject("branchList",pageBranch.findAllBranch());
        mv.setViewName("index");
        return mv;
    }

}
